//把所有的模块做统一处理
//导出统一方法 useStore

import React from 'react'
import LoginStore from './login.Store'
import UserStore from './user.Store'
import ChannelStore from './channel.Store'


class RootStore{
    constructor(){
       this.loginStore = new LoginStore()
       this.userStore=new UserStore()
       this.channelStore=new ChannelStore()
        //...
    }


}
const rootstore=new RootStore()
const context=React.createContext(rootstore)
const useStore=()=>React.useContext(context)
export {useStore}